﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Automobile.service.BLL;
using Automobile.service.Model;

namespace Automobile.service.UI
{
    public partial class Journa_list : System.Web.UI.Page
    {
        JournalBLL bll = new JournalBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                JournaDatasouc();
            }
        }
        protected void JournaDatasouc()
        {
            Label1.Text = bll.GetJournaCount(Convert.ToInt32(Session["empid"]));
            Repeater1.DataSource = bll.ShowJournal(Convert.ToInt32(Session["empid"]));
            Repeater1.DataBind();
        }
        protected void Unnamed_ServerClick(object sender, EventArgs e)
        {
            string journacontent = Request.Form["Journa_Content"].ToString();
            Repeater1.DataSource = bll.GetJournalByJournalContent(Convert.ToInt32(Session["empid"]),journacontent);
            Repeater1.DataBind();
        }
    }
}